{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "scores = [3.0, 1.0, 0.2]\n",
    "def softmax(x):\n",
    "    \"\"\"Compute softmax values for each sets of scores in x.\"\"\"\n",
    "    return np.exp(x) / np.sum(np.exp(x), axis = 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[ 0.8360188   0.11314284  0.05083836]\n"
     ]
    }
   ],
   "source": [
    "print(softmax(scores))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x1fa43ced400>,\n",
       " <matplotlib.lines.Line2D at 0x1fa43ced5f8>,\n",
       " <matplotlib.lines.Line2D at 0x1fa43ced7f0>]"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "x = np.arange(-2.0, 6.0, 0.1)\n",
    "scores = np.vstack([x, np.ones_like(x), 0.2 * np.ones_like(x)])\n",
    "\n",
    "plt.plot(x, softmax(scores).T, linewidth=2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4FNe9//H3WUmruuoFVQSI3kH0ZhsXbAdjXGLcW4Id\n24nj5Kbf/NJu2s1NbMdx7NjYcey4Y2NwwWAMwZUiehdCQqj33na1e35/jBACAxKw0uyuvq/nmWe1\nM6OZrwT6aHTmzDlKa40QQgjfYjG7ACGEEO4n4S6EED5Iwl0IIXyQhLsQQvggCXchhPBBEu5CCOGD\nJNyFEMIH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\nR1prT6ntMeCHgMvsQk5DA+uUUts6pvv0BIOACuCfHU1Zy5RSoe46uEeHu1JqnVJq72mWRV32+RnG\nn9Eve1ptwrsppcKAt4Dvaq3rza7nOK21U2s9AeOv1alKqTFm16SU+hpQrrXeZnYtZzC743t2JUYz\n21yzC8KYT2MS8JTWeiLQBLjtnlifTpB9rrTWl55tu1LqLuBrwHzdx306u6vNg/RofltxMqVUAEaw\nv6y1ftvsek5Ha12rlNqAcd/C7JvSs4BrlFJXAUFAuFLq31rr20yuCwCtdVHHa7lSagVGc6XZ98QK\ngcIuf3ktx43h7tFX7mejlFqA8SfgNVrrZrPr8WA9mQNXdKGUUhjtoAe01n8xu56ulFJxx3uGKaWC\ngcuAg+ZWBVrrn2itU7TW6Rj/x9Z7SrArpUKVUrbjHwOXY/4vQ7TWpUCBUmp4x6r5wH53Hd9rwx34\nG2ADPuro3vR0d5/QV5RSi5VShcAM4H2l1Bqzaum46Xx8DtwDwBta631m1dOVUupV4EtguFKqUCl1\nr9k1dZgF3A5c0vF/a2fHFaknSAQ2KKV2Y/zi/khr7VHdDj1QAvCZUmoXsAV4X2v9ock1Hfdt4OWO\nf88JwO/cdWB5QlUIIXyQN1+5CyGEOAMJdyGE8EES7kII4YMk3IUQwgdJuAshhA+ScBdCCB8k4S6E\nED5Iwl0IIXzQ/weyASi1V9bLRgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1fa436a4be0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([  9.99999998e-01,   2.06115362e-09,   6.91440009e-13])"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "scores = np.array([3.0, 1.0, 0.2])\n",
    "softmax(scores * 10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 0.38842275,  0.31801365,  0.2935636 ])"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "softmax(scores/10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0.024, 0.064, 0.175, 0.475, 0.024, 0.064, 0.175]\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "z = [1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0]\n",
    "z_expo = [math.exp(i) for i in z]\n",
    "sum_z_expo = sum(z_expo)\n",
    "softmax = [round(i/sum_z_expo, 3) for i in z_expo]\n",
    "print(softmax)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
